package com.lyc.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.lyc.callerinfo.model.db.HyBean;
import com.lyc.callerinfo.model.db.MarkedRecord;
import com.lyc.callerinfo.model.db.InCall;
import com.lyc.callerinfo.model.db.InCallBean;

import com.lyc.greendao.HyBeanDao;
import com.lyc.greendao.MarkedRecordDao;
import com.lyc.greendao.InCallDao;
import com.lyc.greendao.InCallBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig hyBeanDaoConfig;
    private final DaoConfig markedRecordDaoConfig;
    private final DaoConfig inCallDaoConfig;
    private final DaoConfig inCallBeanDaoConfig;

    private final HyBeanDao hyBeanDao;
    private final MarkedRecordDao markedRecordDao;
    private final InCallDao inCallDao;
    private final InCallBeanDao inCallBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        hyBeanDaoConfig = daoConfigMap.get(HyBeanDao.class).clone();
        hyBeanDaoConfig.initIdentityScope(type);

        markedRecordDaoConfig = daoConfigMap.get(MarkedRecordDao.class).clone();
        markedRecordDaoConfig.initIdentityScope(type);

        inCallDaoConfig = daoConfigMap.get(InCallDao.class).clone();
        inCallDaoConfig.initIdentityScope(type);

        inCallBeanDaoConfig = daoConfigMap.get(InCallBeanDao.class).clone();
        inCallBeanDaoConfig.initIdentityScope(type);

        hyBeanDao = new HyBeanDao(hyBeanDaoConfig, this);
        markedRecordDao = new MarkedRecordDao(markedRecordDaoConfig, this);
        inCallDao = new InCallDao(inCallDaoConfig, this);
        inCallBeanDao = new InCallBeanDao(inCallBeanDaoConfig, this);

        registerDao(HyBean.class, hyBeanDao);
        registerDao(MarkedRecord.class, markedRecordDao);
        registerDao(InCall.class, inCallDao);
        registerDao(InCallBean.class, inCallBeanDao);
    }
    
    public void clear() {
        hyBeanDaoConfig.clearIdentityScope();
        markedRecordDaoConfig.clearIdentityScope();
        inCallDaoConfig.clearIdentityScope();
        inCallBeanDaoConfig.clearIdentityScope();
    }

    public HyBeanDao getHyBeanDao() {
        return hyBeanDao;
    }

    public MarkedRecordDao getMarkedRecordDao() {
        return markedRecordDao;
    }

    public InCallDao getInCallDao() {
        return inCallDao;
    }

    public InCallBeanDao getInCallBeanDao() {
        return inCallBeanDao;
    }

}
